package com.tio.server;


import com.tio.server.http.TioHttpServerStarter;
import com.tio.server.tcp.server.TioServerStarter;
import com.zengtengpeng.annotation.EnableMQ;
import lombok.extern.log4j.Log4j2;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.tio.utils.jfinal.P;

@Log4j2
@SpringBootApplication
@EnableMQ
public class TioServerApplication {

	public static void main(String[] args) {
		try {
			SpringApplication.run(TioServerApplication.class, args);
			P.use("app.properties");
			TioServerStarter.start();
			TioHttpServerStarter.start();
		}catch (Exception e){
			log.error(e.getMessage(), e);
		}
	}

}
